﻿using LX.MVC.Open.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LX.MVC.Open.Controllers
{
    public class FirstController : Controller
    {
        // GET: First
        public ActionResult Index()
        {
            return View();
        }
        //[CustomAuthorize]
        public ActionResult Info()
        {
            return View();
        }
        [CustomAllowAnonymous]
        public ActionResult Login(string account, string password)
        {
            if("hjw".Equals(account) && "123456".Equals(password))
            {
                base.HttpContext.Session["CurrentUser"] = $"{account}_{password}";
            }
            base.ViewBag.UserAccount = account;
            return View();
        }

    }
}